package dataTypes;

public class TwoDArray {

	
	
	public static void main(String[] args )
	{
		int arr[][] =  {
			{1,2,9},
			{56,45,65},
			{65,24,45},
			{34,66,96}
						};
		
		System.out.println("Max number is " + maxNum(arr));
	}
	
	public static int maxNum(int[][] arr)
	{
		int max = arr[0][0] ;
		
		for(int i = 0 ; i < arr.length ; i++)
		{
			for(int j = 0 ; j < arr[i].length ; j++ )
			{
				if(arr[i][j] > max)
				{
					max = arr[i][j] ;
				}
			}
		}
		
		return max;
	}
}
